<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <!-- <script src="../dist/poll-api.global.js"></script>
  <script>
    console.log($pollApi.poll, 'oooo')
  </script> -->
  <script type="module">
    import PollApi from '../dist/poll-api.esm-bundler.js'
    PollApi.poll('test', (err, res) => {
      if (err) {
        console.log(err, 'uuuuuuuu')
        return
      }
      console.log(res,'xxxxx')
    }, {
      requestConfig: {
        url: '/user',
        method: 'get', // 默认值
        baseURL: 'http://localhost:8080/',
      }
    })
    console.log(PollApi, 'uuu')
  </script>
</body>
</html>